<!DOCTYPE html>
<html>
<head lang="en">
	<meta charset="UTF-8">
<title>图片轮换</title>
	<link rel="stylesheet" href="css/scroll.css">

</head>
<script>
	function rep(t){
		var img=document.getElementById("photo");
		var num=t.innerHTML;
		var su=new Array("images/1.gif","images/2.gif","images/3.jpg","images/4.jpg","images/5.gif");	
		img.setAttribute("src",su[num-1]);
	}
</script>
<body>
<div class="scroll">
	<div id="num">
		<a href="#" onclick="rep(this)">1</a>
		<a href="#" onclick="rep(this)">2</a>
		<a href="#" onclick="rep(this)">3</a>
		<a href="#" onclick="rep(this)">4</a>
		<a href="#" onclick="rep(this)">5</a>
	</div>
	<img src="images/1.gif" alt="图片" id="photo"/>
</div>
</body>
</html>
